home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Patches.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  3.9 KB  |  155 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Patches.a
  3. ;
  4. ;    Contains:    Patch Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 8
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.  
  19.     IF &TYPE('__PATCHES__') = 'UNDEFINED' THEN
  20. __PATCHES__ SET 1
  21.  
  22.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  23.     include 'MacTypes.a'
  24.     ENDIF
  25.  
  26.     IF TARGET_OS_MAC THEN
  27.  
  28. kOSTrapType                        EQU        0
  29. kToolboxTrapType                EQU        1
  30. ; typedef SignedByte                     TrapType
  31.  
  32.  
  33. OSTrap                            EQU        0                    ; old name 
  34. ToolTrap                        EQU        1                    ; old name 
  35. ;    GetTrapAddress and SetTrapAddress are obsolete and should not
  36. ;    be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  37. ;    The old routines will not be supported for PowerPC apps.
  38. ;
  39.  
  40.     IF TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  41. ;
  42. ; pascal UniversalProcPtr GetTrapAddress(UInt16 trapNum)
  43. ;
  44.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  45.         ; parameters:
  46.         ;    trapNum         => D0
  47.         ; returns:
  48.         ;    UniversalProcPtr <= A0
  49.         _GetTrapAddress:    OPWORD    $A146
  50.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  51.         IMPORT_CFM_FUNCTION GetTrapAddress
  52.     ENDIF
  53.  
  54. ;
  55. ; pascal void SetTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  56. ;
  57.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  58.         ; parameters:
  59.         ;    trapAddr        => A0
  60.         ;    trapNum         => D0
  61.         _SetTrapAddress:    OPWORD    $A047
  62.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  63.         IMPORT_CFM_FUNCTION SetTrapAddress
  64.     ENDIF
  65.  
  66.     ENDIF
  67. ;
  68. ; pascal UniversalProcPtr GetOSTrapAddress(UInt16 trapNum)
  69. ;
  70.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  71.         ; parameters:
  72.         ;    trapNum         => D0
  73.         ; returns:
  74.         ;    UniversalProcPtr <= A0
  75.         _GetOSTrapAddress:    OPWORD    $A346
  76.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  77.         IMPORT_CFM_FUNCTION GetOSTrapAddress
  78.     ENDIF
  79.  
  80. ;
  81. ; pascal void SetOSTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  82. ;
  83.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  84.         ; parameters:
  85.         ;    trapAddr        => A0
  86.         ;    trapNum         => D0
  87.         _SetOSTrapAddress:    OPWORD    $A247
  88.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  89.         IMPORT_CFM_FUNCTION SetOSTrapAddress
  90.     ENDIF
  91.  
  92. ;
  93. ; pascal UniversalProcPtr GetToolTrapAddress(UInt16 trapNum)
  94. ;
  95.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  96.         ; parameters:
  97.         ;    trapNum         => D0
  98.         ; returns:
  99.         ;    UniversalProcPtr <= A0
  100.         _GetToolTrapAddress:    OPWORD    $A746
  101.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  102.         IMPORT_CFM_FUNCTION GetToolTrapAddress
  103.     ENDIF
  104.  
  105. ;
  106. ; pascal void SetToolTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  107. ;
  108.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  109.         ; parameters:
  110.         ;    trapAddr        => A0
  111.         ;    trapNum         => D0
  112.         _SetToolTrapAddress:    OPWORD    $A647
  113.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  114.         IMPORT_CFM_FUNCTION SetToolTrapAddress
  115.     ENDIF
  116.  
  117. ;
  118. ; pascal UniversalProcPtr GetToolboxTrapAddress(UInt16 trapNum)
  119. ;
  120.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  121.         ; parameters:
  122.         ;    trapNum         => D0
  123.         ; returns:
  124.         ;    UniversalProcPtr <= A0
  125.         _GetToolboxTrapAddress:    OPWORD    $A746
  126.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  127.         IMPORT_CFM_FUNCTION GetToolboxTrapAddress
  128.     ENDIF
  129.  
  130. ;
  131. ; pascal void SetToolboxTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
  132. ;
  133.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  134.         ; parameters:
  135.         ;    trapAddr        => A0
  136.         ;    trapNum         => D0
  137.         _SetToolboxTrapAddress:    OPWORD    $A647
  138.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  139.         IMPORT_CFM_FUNCTION SetToolboxTrapAddress
  140.     ENDIF
  141.  
  142.     IF TARGET_CPU_PPC THEN
  143. ;
  144. ; pascal UniversalProcHandle GetTrapVector(UInt16 trapNumber)
  145. ;
  146.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  147.         IMPORT_CFM_FUNCTION GetTrapVector
  148.     ENDIF
  149.  
  150.     ENDIF    ; TARGET_CPU_PPC
  151.     ENDIF    ; TARGET_OS_MAC
  152.     ENDIF ; __PATCHES__ 
  153.  
  154.